package com.test.job;

import org.quartz.*;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

//@Component
//@PersistJobDataAfterExecution//持久化jobDetail
//@DisallowConcurrentExecution//禁止并发执行
public class FengArticleJob /*extends QuartzJobBean */{
    //@Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        JobDetail jobDetail = jobExecutionContext.getJobDetail();
//        Object port = YamlReader.getInstance().getValueByKey("server", "port");
//        logger.info("进入定时任务自动爬取凤凰网文章, taskName: " + jobDetail.getKey().getName() +
//                ", jobGroup: " + jobDetail.getKey().getGroup() + ", jobClass: " + jobDetail.getJobClass().getName()+", port: "+port);
        System.out.println("进入定时任务自动爬取凤凰网文章, taskName: " + jobDetail.getKey().getName() +
                ", jobGroup: " + jobDetail.getKey().getGroup() + ", jobClass: " + jobDetail.getJobClass().getName());

    }
}
